<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>皎骥旅游网</title>
    <link rel="stylesheet" th:href="@{/asserts/css/style.css}">
    <link rel="stylesheet" th:href="@{/asserts/css/basic.css}">
    <!-- BootStrapCss -->
    <link rel="stylesheet" th:href="@{/asserts/css/bootstrap.min.css}">
</head>

<body>
    <!--网页通用导航栏-->
    <header th:insert="~{commons::header(active='index')}"></header>

    <div class="search">
        <div class="center"></div>
        <form th:action="@{/likeQueryAttraction}" id="search_form">
        <input name="search" class="input" type="text" th:placeholder="${error==null?'请输入旅游景点或城市':error}">
        <a class="button" onclick="document:search_form.submit();">搜索</a>
        </form>
    </div>

    <div class="tour">
        <section class="news">
            <h2>热门旅游</h2>
            <p>国内旅游、国外旅游、自助旅游、自驾旅游、油轮签证、主题旅游等各种最新热门旅游推荐</p>
        </section>


        <figure th:each="attraction:${session.attractions}">
            <a th:href="@{/toSceneryInfo/}+${attraction.getAttractionId()}"><img th:src="@{/asserts/img_upload/}+${attraction.getAttractionPic()}" style="width: 370px;height: 230px"></a>
            <figcaption>
                <strong class="title" th:text="${attraction.getAttractionText().substring(0,20)}"></strong>.....
                <div class="info">
                    <em class="sat" th:text="${'满意度 '+#numbers.formatDecimal(T(java.lang.Math).floor(T(java.lang.Math).random()*10+90),1,0)+'%'}">生成满意度</em>
                    <span class="price"><strong th:text="${attraction.getAttractionName()}"></strong></span>
                </div>
            </figcaption>
        </figure>

    </div>


    <!--网页通用footer-->
    <div th:insert="~{commons::footer}"></div>


</body>

</html>